<template>
  <div class="app-container">
    <el-card type="border-card" class="card">
      <el-form ref="queryForm" label-width="80px" :inline="true">
        <el-form-item label="堆芯选择:">
          <el-radio-group v-model="facId">
            <el-radio :label="item.id" v-for="item in facList">{{
              item.name
            }}</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <el-form label-width="80px">
        <el-form-item label="堆芯详情:" />
      </el-form>
      <reactor-core :facId="1" v-show="facId == 1" />
      <carr-reactor :facId="2" v-show="facId == 2" />
    </el-card>
  </div>
</template>

<script>
import { listFacility } from "@/api/emergency/alarmsetting";
import reactorCore from "@/views/emergency/facData/reactor/reactorCore";
import CarrReactor from "./carrReactor";
export default {
  name: "reactorIndex",
  components: { CarrReactor, reactorCore },
  data() {
    return {
      facList: [],
      facId: null,
      conheight: {
        height: "",
      },
    };
  },
  created() {
    this.init();
  },
  mounted() {
    // 页面高度显示自适应
    window.addEventListener("resize", this.getHeight);
    this.getHeight();
  },
  methods: {
    getHeight() {
      this.conheight.height = window.innerHeight - 140 + "px";
      console.log(this.conheight, "0000000");
    },
    init() {
      this.$axios.get("/static/emergency/data/facList.json").then((res) => {
        // await listFacility().then((res) => {
        this.facList = res.data.rows;
        this.facId = this.facList[0].id;
      });
    },
  },
};
</script>

<style scoped>
</style>
